#ifndef XVERTEXBUFFERD3D9
#define XVERTEXBUFFERD3D9
#include "..\XModEngine\XVertexBuffer.h"
#include "XRenderD3D9.h"
#include "D3DInclude.h"

class XVertexBufferD3D9 : public XVertexBuffer{
private:
	IDirect3DVertexBuffer9* m_buffer;
	IDirect3DVertexBuffer9* m_back_buffer;
	void* ptr_back_buffer;
	friend class XRenderD3D9;
public:
	XVertexBufferD3D9();
	~XVertexBufferD3D9();
	bool Init();
	string ToString();
	void SetVertexBuffer(XVertexBuffer* m_vertexbuffer);
	void SetSourceBuffer(void* ptr_buffer, int i_offest, int i_size);
	void GetSourceBuffer(void** ptr_buffer);
	IDirect3DVertexBuffer9* GetBufferD3D();
	void SetBufferD3D(IDirect3DVertexBuffer9*);
};
#endif